{extend name="template/base" /}
{block name="content"}
<div class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="{:\\think\\Request::instance()->baseUrl()}">
        <input type="hidden" name="id" value="{$id}">
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">平台名称：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="平台名称" name="name" value="{$platform.name??''}">
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">平台简称：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" placeholder="平台简称" {if (isset($id))} disabled {/if} name="platform_name" value="{$platform.platform_name??''}">
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;保存&nbsp;&nbsp;</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
{/block}
{block name="script"}


<!--时间插件-->
<script type="text/javascript" src="__LIB__/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="__LIB__/template/template.js"></script>
<script>
    function agree(id) {
        $.ajax({
            type: 'POST',
            url: "/admin/order/get_route_id?id=" + id,
            data: null,
            success: function (re) {
                layer.msg(re.msg, {
                    time: 2000, //2s后自动关闭
                });
            },
        });
    }

    function add() {

        html = template(document.getElementById('td').innerHTML, {});
        $("#tbody").append(html);
    }

    function deltd(ele) {
        $(ele).parent().parent().remove();
    }

    $(function () {
        $("[name='order_status'][value='{$vo.order_status ?? 'pay_for'}']").attr("checked", true);
        $("[name='refund_status'][value='{$vo.refund_status ?? ''}']").attr("checked", true);
        $("[name='isrefund'][value='{$vo.isrefund ?? '0'}']").attr("checked", true);
        $("[name='platform'][value='{$vo.platform ?? 'manually'}']").attr("checked", true);

        $("[name='route_id']").find("[value='{$vo.route_id}']").attr("selected", true);

        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form").Validform({
            tiptype: 2,
            ajaxPost: true,
            showAllError: true,
            callback: function (ret) {
                ajax_progress(ret);
            }
        });
    })
</script>

<script type="text/javascript">


</script>
{/block}
